package net.towee.model.account;


import java.util.List;

/**
 * This interface contain group name and attached contacts(AccountIdentitise)
 * @author  c58
 */
public interface ContactsGroup extends RuleDestination {
	/**
	 * @return id of this group of contacts
	 */
	String getId();
	
	/**
	 * @return  name of group
	 */
	String getName();
	
	/**
	 * Set name of group
	 */
	void setName(String name);
	
	/**
	 * Add new contact
	 * @param account
	 */
	void addContact(AccountIdentity account);
	
	/**
	 * @return list of all contacts in this group
	 */
	List<AccountIdentity> getContactsList();
	
	/**
	 * Delete account identity
	 * @param account 
	 */
	void deleteContact(AccountIdentity account);
	
	/**
	 * Check account exists in this group
	 * @param account
	 * @return
	 */
	boolean hasContact(AccountIdentity account);
	
	/**
	 * Delete all contacts of group
	 */
	void clearGroup();
}
